"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const taro_1 = require("@tarojs/taro");
const components_1 = require("@tarojs/components");
const lodash_1 = require("lodash");
// import { AtTabBar } from "taro-ui";
const tabbar_1 = require("../../components/tabbar/tabbar");
require("./index.scss");
// interface states {
//   current: number;
// }
class Index extends react_1.Component {
    constructor() {
        // state: states = {
        //   current: 0
        // };
        super(...arguments);
        // handleClick = (value: number) => {
        //   this.setState({
        //     current: value
        //   });
        // };
        this.pageCopyright = () => {
            const userInfo = taro_1.default.getStorageSync("userInfo");
            if (lodash_1.isEmpty(userInfo)) {
                taro_1.default.navigateTo({
                    url: "/components/login/login"
                });
            }
            else {
                taro_1.default.navigateTo({
                    url: "/pages/copyright/copyright"
                });
            }
        };
    }
    render() {
        return (<components_1.View className="index">
        <components_1.Swiper className="test-h" indicatorColor="#999" indicatorActiveColor="#333" circular indicatorDots autoplay>
          <components_1.SwiperItem>
            <components_1.View className="swiper-style"/>
          </components_1.SwiperItem>
        </components_1.Swiper>
        <components_1.View className="copyright">
          <components_1.View className="at-article">版权服务</components_1.View>
          <components_1.View className="copyright-box">
            <components_1.View className="copyright-item" onClick={this.pageCopyright}>
              版权登记
            </components_1.View>
            <components_1.View className="copyright-item">软著申请</components_1.View>
            <components_1.View className="copyright-item">版权购买</components_1.View>
          </components_1.View>
        </components_1.View>
        <components_1.View className="copyright">
          <components_1.View className="at-article">版权科普</components_1.View>
          <components_1.Swiper className="copyright-know" indicatorColor="#999" indicatorActiveColor="#333" circular vertical autoplay>
            <components_1.SwiperItem>
              <components_1.View className="swiper-style"/>
            </components_1.SwiperItem>
          </components_1.Swiper>
        </components_1.View>
        <tabbar_1.default />
      </components_1.View>);
    }
}
exports.default = Index;
//# sourceMappingURL=index.jsx.map